#include "iostream"
using namespace std;

inline float divideBy1(int i)
{
    float res = 1.0 / (i + 2);
    return res;
}

int main()
{
    float pi;
    float res = 1;
    for (int i = 1; i <= 1e8; i += 2)
    {
        res -= divideBy1(i);
        i += 2;
        res += divideBy1(i);
    }
    pi = 4 * res;
    cout << pi << endl;
}